package ptaTest3;

import java.util.Arrays;
import java.util.Scanner;
class Rectangle1 {
	private int width;
	private int length;
	
	@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}
	public Rectangle1(int width,int length){
		this.width=width;
		this.length=length;
	}
	
	public int getPerimeter(){
		return 2*(length+width);
	}
	public int getArea(){
		return width*length;
	}
}
class Circle1 {
	private int radius;
	
	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	public Circle1(int radius){
		this.radius=radius;
	}
	public int getPerimeter(){
		return (int)(2*Math.PI*radius);
	}
	public int getArea(){
		return (int)(Math.PI*radius*radius);
	}
	
}
public class Test353 {

	public static void main(String[] args) {
		Scanner scan=new Scanner(System.in);
		Rectangle[] r=new Rectangle[2];
		Circle[] c=new Circle[2];
		r[0]=new Rectangle(scan.nextInt(),scan.nextInt());
		r[1]=new Rectangle(scan.nextInt(),scan.nextInt());
        c[0]=new Circle(scan.nextInt());
        c[1]=new Circle(scan.nextInt());
        System.out.println(r[0].getPerimeter()+r[1].getPerimeter()+c[0].getPerimeter()+c[1].getPerimeter());
        System.out.println(r[0].getArea()+r[1].getArea()+c[0].getArea()+c[1].getArea());
        System.out.println(Arrays.toString(r));
        System.out.println(Arrays.toString(c));
        scan.close();
	}

}